﻿<!DOCTYPE html>
<html>
<head>
    <title>模板设置</title>
    $css()
    <style type="text/css">
        textarea {
            width: 500px;
        }

        .form .fl div.label {
            width: 120px;
        }

        .form .fl div.in {
            margin-left: 120px;
        }
    </style>
</head>
<body>
        <div class="form form2" style="margin:20px;" id="form">

            <div class="title"><span class="icon icon1"></span>基本</div>

            <div class="fl">
                <div class="label">模板错误：</div>
                <div class="in">
                    <input type="radio" name="showError" id="show_error" /><label for="show_error">显示</label>
                    <input type="radio" name="showError" id="hidden_error" checked="checked" /><label for="hidden_error">不显示</label>
                </div>
            </div>

            <div class="fl">
                <div class="label"><span class="red">*</span>站点地图分割符：</div>
                <div class="in">
                    <input field="tpl_cfg_sitemapsplit" value="${tpl_cfg_sitemapsplit}" />
                </div>
            </div>

            <div class="title"><span class="icon icon1"></span>文档</div>

            <div class="fl">
                <div class="label"><span class="red">*</span>摘要长度：</div>
                <div class="in">
                    <input type="text" class="ui-validate" isnumber="true" field="tpl_cfg_outlinelength" value="${tpl_CFG_OutlineLength}" style="width:30px" />
                    &nbsp; 字<span style="color:Red">(用于显示在列表中的描述，默认80字)</span>
                </div>
            </div>

            <div class="fl">
                <div class="label"><span class="red">*</span>标签链接格式：</div>
                <div class="in">
                    <textarea field="tpl_cfg_archivetagsformat" rows="3">${tpl_cfg_archivetagsformat}</textarea>
                </div>
            </div>

            <div class="fl">
                <div class="label">允许匿名评论：</div>
                <div class="in">
                    <input type="checkbox" style="width:auto;border:none;" field="tpl_cfg_allowamouscomment" ${tpl_cfg_allowamouscomment} /></dd>
                </div>
            </div>

            <div class="fl">
                <div class="label"><span class="red">*</span>评论HTML：</div>
                <div class="in">
                    <textarea field="tpl_cfg_commenteditorhtml" rows="3">${tpl_CFG_CommentEditorHtml}</textarea>
                </div>
            </div>


            <div class="title"><span class="icon icon1"></span>友情链接</div>

            <div class="fl">
                <div class="label"><span class="red">*</span>显示条数：</div>
                <div class="in">
                    <input type="text" class="tb_normal ui-validate" isnumber="true" field="tpl_cfg_friendshownum" value="${tpl_CFG_FriendShowNum}" style="width:30px" />&nbsp;条
                </div>
            </div>

            <div class="fl">
                <div class="label"><span class="red">*</span>显示格式：</div>
                <div class="in">
                    <textarea field="tpl_cfg_friendlinkformat" rows="3">${tpl_CFG_FriendLinkFormat}</textarea>
                </div>
            </div>

            <div class="title"><span class="icon icon1"></span>导航</div>

            <div class="fl">
                <div class="label"><span class="red">*</span>导航链接格式：</div>
                <div class="in">
                    <textarea field="tpl_cfg_navigatorlinkformat" rows="3">${tpl_CFG_NavigatorLinkFormat}</textarea>
                </div>
            </div>

            <div class="fl">
                <div class="label"><span class="red">*</span>子导航链接格式：</div>
                <div class="in">
                    <textarea field="tpl_cfg_navigatorchildformat" rows="3">${tpl_CFG_NavigatorChildFormat}</textarea>
                </div>
            </div>

            <div class="title"><span class="icon icon1"></span>统计</div>

            <div class="fl">
                <div class="label"><span class="red">*</span>流量统计格式：</div>
                <div class="in">
                    <textarea field="tpl_cfg_trafficformat" rows="3">${tpl_CFG_TrafficFormat}</textarea>
                </div>
            </div>

            <div class="fl">
                <div class="label"></div>
                <div class="in">
                    <a class="btn leftbtn" onclick="return submitForm()" href="javascript:;">保存</a>
                </div>
            </div>

        </div>

 

    $js()
    <script type="text/javascript">
        function submitForm() {
            if (cms.validator.validate()) {
                cms.xhr.jsonPost(location.href, cms.json.toObject(document), function (json) {
                    if (json.result) {
                        tip(json.message);
                    } else {
                        tip(json.message);
                    }
                });
            }
            return false;
        }
        function tip(msg) {
            parent.M.alert(msg);
        }


    </script>

</body>
</html>
